package YAVMM::Console::Spice;
use Moose;

extends 'YAVMM::Object';

has 'address' => (
    is        => 'rw',
    isa       => 'Str',
    documentation => 'Set the IP address spice is listening on. Default is any address',
);

has 'port'    => (
    is        => 'rw',
    isa       => 'Int',
    documentation => 'Set the TCP port spice is listening on',
);

has 'password' => (
    is        => 'rw',
    isa       => 'Str|Undef',
    documentation => 'Set the password you need to authenticate',
);

# must be 1 if password is not set
has 'disable_ticketing' => (
    is        => 'rw',
    isa       => 'Bool',
    default   => 1,
    documentation => 'Allow client connects without authentication',
);

# foreach my $attr ($class->meta->get_all_attributes) {
#     if ($attr->has_type_constraint) { print $attr->type_constraint }
#     if ($attr->has_documentation) { print $attr->documentation; }
# }

has 'tls'     => (
    is        => 'rw',
    isa       => 'Bool',
    default   => 0,
    documentation => 'Use TLS',
);

has 'x509'    => (
    is        => 'rw',
    isa       => 'Str',
    documentation => 'Set the x509 file directory.',
);

with 'YAVMM::Console';

__PACKAGE__->meta->make_immutable;
no Moose;
1;


__END__

=head1 NAME

YAVMM::Console::Spice - Spice console settings for a YAVMM Guest

=head1 SEE ALSO

L<QEMU spice settings|http://qemu.weilnetz.de/qemu-doc.html#index-g_t_002dspice-51>
